home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_lag_shipdoorstuck.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  52 lines

  1. # Jones 3D Cog Script
  2. #
  3. # lag_shipdoorStuck.cog
  4. #
  5. # Locked Ships Rotating Door Script
  6. #
  7. # [DS]
  8. #
  9. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # =======================================================================================
  12.  
  13. symbols
  14.     message    startup
  15.     message    activate    
  16.  
  17.        thing        door0
  18.     thing        player                        local
  19.     keyframe    in_activate=in_activate_medium.key        local
  20.     sound        stuckwav0=inxj098.wav                local    # It won't budge.
  21.     sound        stuckwav1=inxj096.wav                local    # I can't open it.
  22.     int        talking=0                        local
  23.     int        sndnum                        local
  24.     int        numsounds=2                        local
  25.     int        tryit                            local
  26.  
  27. end
  28.  
  29. # ========================================================================================
  30.  
  31. code
  32. startup:
  33.     player = GetLocalPlayerThing();
  34.     return;
  35.  
  36. activate:
  37.     if (GetSenderRef() != door0) return;
  38.     if(talking == 1) return;
  39.     sndnum = rand()*numsounds;
  40.     talking=1;
  41.     SetActorFlags(player, 0x200000);
  42.     StopThing(player);
  43.     tryit = PlayVoice(player, stuckwav0[sndnum], 1.0, 0);
  44.     PlayKey(player, in_activate, 4, 0x12, 1);
  45.     WaitForSound(tryit);
  46.     ClearActorFlags(player, 0x200000);
  47.     talking=0;
  48.     return;
  49.  
  50. end
  51.  
  52.